<?php /*
@session_start();
 if((!isset($_SESSION["kt_login_id"]) && !isset($_SESSION["kt_login_user"]) &&  !isset($_SESSION["kt_login_level"])) ) {

    header("Location: login.php");
    exit;
	
}else{

$level = addslashes($_SESSION['kt_login_user']);
$user = addslashes($_SESSION['kt_login_level']);

echo $level;
echo $user;
}*/

require("classes/respondent.class.php");
$respondent = new Respondent();
$listrespondent = $respondent->listObject();
$list = mysql_fetch_assoc($listrespondent);
$arrCampo = array_keys($list);
$arrValores = array_values($list);
$i = 1;
print_r($arrCampo);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/user2.dwt.php" codeOutsideHTMLIsLocked="false" --><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Print Controller</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEditableHeadTag -->
<link href="includes/skins/mxkollection3.css" rel="stylesheet" type="text/css" media="all" />
<script src="includes/common/js/base.js" type="text/javascript"></script>
<script src="includes/common/js/utility.js" type="text/javascript"></script>
<script src="includes/skins/style.js" type="text/javascript"></script>
<!-- InstanceEndEditable -->
<style type="text/css" media="all">
<!--
@import url("css/basics.css");
-->
</style>
<!-- TinyMCE -->
<script type="text/javascript" src="includes/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript"
   src="includes/tiny_mce/plugins/tinybrowser/tb_tinymce.js.php"></script>
<script type="text/javascript">
	tinyMCE.init({
		// General options
    	mode : "textareas",
		theme : "advanced",
		plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

		// Theme options
theme_advanced_buttons1:
"code,bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,cleanup,link,unlink,image,table",

		// Theme options
		theme_advanced_buttons2 : "formatselect,fontselect,fontsizeselect,forecolor,backcolor,fullscreen",
		theme_advanced_buttons3 : "",
		theme_advanced_buttons4 : "",


		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,

		// Example content CSS (should be your site CSS)
	 content_css : "css/content.css",

		// Drop lists for link/image/media/template dialogs
		template_external_list_url : "lists/template_list.js",
		external_link_list_url : "lists/link_list.js",
		external_image_list_url : "lists/image_list.js",
		media_external_list_url : "lists/media_list.js",
    file_browser_callback : "tinyBrowser",
		// Replace values for the template plugin
		template_replace_values : {
			username : "Some User",
			staffid : "991234"
		}
	});
</script>
<!-- /TinyMCE -->

</head>
<body>
<div id="box">
<div id="topo">
<span>
<img src="images/logo.png" alt="QS Controller" width="293" height="112"  />
</span>
<p>Version: 1.0</p>
<p>Status: Beta </p>
<p><!-- InstanceBeginEditable name="logout" -->logout<!-- InstanceEndEditable --></p>

</div><!-- end div topo-->
<div id="menuhorizontal">
  <table width="500" border="0" cellspacing="2" cellpadding="2">
    <tr>
      <td><a href="index.php">Home</a></td>
       <td><a href="registered.php">People</a></td>
        <td><a href="newsletterList.php">Newsletter</a></td>
        
      <td><a href="statistics.php">Statistics</a></td>
    </tr>
  </table>


</div><!-- end div menuhorizontal -->

<div id="content">
<!-- InstanceBeginEditable name="content" -->  <div class="KT_tng" >
      <h1> Qls_respondents</h1>
      <div class="msgerror" id="msgerror">
      <?php ?>
      </div>
	  <?php 
  echo"<table class = 'listTable' >	<tr>";

foreach($arrCampo as $campo){
	echo "
<th>".$campo."</th>
	
	";
}
echo "
<th colspan= '3'>:: FUNCTIONS ::</th>


</tr>";
//$res1 = $db->seleciona("SELECT * FROM qls_countries");
	   while($list =mysql_fetch_assoc($listrespondent) ){
	   
	   if (($i % 2) == 1){ $fundo="#FEFEFE"; }else{ $fundo="#CDCDCD"; }
$i++;
			echo "			
			<tr bgcolor=$fundo>";
$arrValores = array_values($list);
foreach($arrValores as $valor){
	echo "
<td>".$valor."</td>
	
	";
}
echo "


<td>View</td>
<td>View</td>
<td>View</td>


</tr>";
			
			
		}
	echo "</table>";
   ?>
      </div><!-- InstanceEndEditable -->
</div><!-- end div content -->
</div> <!-- end div box -->

</body>
<!-- InstanceEnd --></html>
